using System;
using System.Collections.Generic;
using System.Data.Linq;
using System.Linq;
using System.Web;

namespace DistanceLearning.Models
{
    public partial class UsersContext
    {
        partial void InsertSchool(School instance)
        {
            if (!Schools.Contains(instance))
                this.ExecuteDynamicInsert(instance);
        }

        partial void UpdateSchool(School instance)
        {
            ExecuteDynamicUpdate(instance);
        }

        partial void DeleteSchool(School instance)
        {
            ExecuteDynamicDelete(instance);
        }

        public void AddUser(UserProfile userProfile)
        {
            UserProfiles.InsertOnSubmit(userProfile);
            SubmitChanges();
        }

        partial void UpdateUserProfile(UserProfile instance)
        {
            ExecuteDynamicUpdate(instance);
        }
    }
}